<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 4.2.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/font-awesome.min.css">


<script id="hexo-configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    hostname: new URL('https://wzc570738205.github.io').hostname,
    root: '/',
    scheme: 'Gemini',
    version: '7.7.0',
    exturl: true,
    sidebar: {"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},
    copycode: {"enable":true,"show_result":true,"style":null},
    back2top: {"enable":true,"sidebar":false,"scrollpercent":false},
    bookmark: {"enable":true,"color":"#222","save":"auto"},
    fancybox: false,
    mediumzoom: false,
    lazyload: false,
    pangu: false,
    comments: {"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},
    algolia: {
      appID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    },
    localsearch: {"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},
    path: 'search.xml',
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}}
  };
</script>

  <meta name="description" content="本文主要内容 列表标签：&lt;ul&gt;、&lt;OL&gt;、&lt;dl&gt; 表格标签：&lt;table&gt; 框架标签及内嵌框架&lt;iframe&gt; 表单标签：&lt;form&gt; 多媒体标签 滚动字幕标签：&lt;marquee&gt;">
<meta property="og:type" content="article">
<meta property="og:title" content="html标签下">
<meta property="og:url" content="https://wzc570738205.github.io/2016/12/10/html%E6%A0%87%E7%AD%BE%E4%B8%8B/index.html">
<meta property="og:site_name" content="王志超的博客">
<meta property="og:description" content="本文主要内容 列表标签：&lt;ul&gt;、&lt;OL&gt;、&lt;dl&gt; 表格标签：&lt;table&gt; 框架标签及内嵌框架&lt;iframe&gt; 表单标签：&lt;form&gt; 多媒体标签 滚动字幕标签：&lt;marquee&gt;">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="http://img.smyhvae.com/2015-10-02-cnblogs_html_01.png">
<meta property="og:image" content="http://img.smyhvae.com/2015-10-02-cnblogs_html_02_1.png">
<meta property="og:image" content="http://img.smyhvae.com/2015-10-02-cnblogs_html_03.png">
<meta property="og:image" content="http://img.smyhvae.com/2015-10-01-cnblogs_html_40.png">
<meta property="og:image" content="http://img.smyhvae.com/20170704_1717.png">
<meta property="og:image" content="http://img.smyhvae.com/20170704_1719.png">
<meta property="og:image" content="http://img.smyhvae.com/2015-10-02-cnblogs_html_04.png">
<meta property="og:image" content="http://img.smyhvae.com/2015-10-02-cnblogs_html_07.png">
<meta property="og:image" content="http://img.smyhvae.com/2015-10-02-cnblogs_html_09.png">
<meta property="og:image" content="http://img.smyhvae.com/20170704_1727.png">
<meta property="og:image" content="http://img.smyhvae.com/20170704_1729.png">
<meta property="og:image" content="http://img.smyhvae.com/2015-10-02-cnblogs_html_10.png">
<meta property="og:image" content="http://img.smyhvae.com/2015-10-02-cnblogs_html_11.png">
<meta property="og:image" content="http://img.smyhvae.com/2015-10-02-cnblogs_html_13.png">
<meta property="og:image" content="http://img.smyhvae.com/2015-10-02-cnblogs_html_15.png">
<meta property="og:image" content="http://img.smyhvae.com/2015-10-02-cnblogs_html_16.png">
<meta property="og:image" content="http://img.smyhvae.com/2015-10-02-cnblogs_html_17.png">
<meta property="og:image" content="http://img.smyhvae.com/2015-10-02-cnblogs_html_26.png">
<meta property="og:image" content="http://img.smyhvae.com/2015-10-02-cnblogs_html_27.png">
<meta property="og:image" content="http://img.smyhvae.com/2015-10-02-cnblogs_html_28.png">
<meta property="og:image" content="http://img.smyhvae.com/2015-10-02-cnblogs_html_gif3.gif">
<meta property="og:image" content="http://img.smyhvae.com/2015-10-02-cnblogs_html_29.png">
<meta property="og:image" content="http://img.smyhvae.com/2015-10-02-cnblogs_html_GIF.gif">
<meta property="og:image" content="http://img.smyhvae.com/2015-10-02-cnblogs_html_33.png">
<meta property="og:image" content="http://img.smyhvae.com/2015-10-02-cnblogs_html_35.png">
<meta property="og:image" content="http://img.smyhvae.com/2015-10-02-cnblogs_html_32.png">
<meta property="og:image" content="http://img.smyhvae.com/2015-10-02-cnblogs_html_34.png">
<meta property="og:image" content="http://img.smyhvae.com/20151002_36.png">
<meta property="og:image" content="http://img.smyhvae.com/2015-10-02-cnblogs_html_37.png">
<meta property="og:image" content="http://img.smyhvae.com/2015-10-02-cnblogs_html_38.png">
<meta property="og:image" content="http://img.smyhvae.com/2015-10-02-cnblogs_html_04.gif">
<meta property="article:published_time" content="2016-12-10T12:59:18.000Z">
<meta property="article:modified_time" content="2020-01-20T07:16:25.888Z">
<meta property="article:author" content="王志超">
<meta property="article:tag" content="html教程">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://img.smyhvae.com/2015-10-02-cnblogs_html_01.png">

<link rel="canonical" href="https://wzc570738205.github.io/2016/12/10/html%E6%A0%87%E7%AD%BE%E4%B8%8B/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome: false,
    isPost: true
  };
</script>

  <title>html标签下 | 王志超的博客</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-meta">

    <div>
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">王志超的博客</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
        <h1 class="site-subtitle" itemprop="description">今天你更博学了吗</h1>
      
  </div>

  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>
</div>


<nav class="site-nav">
  
  <ul id="menu" class="menu">
        <li class="menu-item menu-item-首页">

    <a href="/" rel="section"><i class="fa fa-fw fa-home"></i>首页</a>

  </li>
        <li class="menu-item menu-item-关于">

    <a href="/about/" rel="section"><i class="fa fa-fw fa-user"></i>关于</a>

  </li>
        <li class="menu-item menu-item-标签">

    <a href="/tags/" rel="section"><i class="fa fa-fw fa-tags"></i>标签</a>

  </li>
        <li class="menu-item menu-item-分类">

    <a href="/categories/" rel="section"><i class="fa fa-fw fa-th"></i>分类</a>

  </li>
        <li class="menu-item menu-item-归档">

    <a href="/archives/" rel="section"><i class="fa fa-fw fa-archive"></i>归档</a>

  </li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>

</nav>
  <div class="site-search">
    <div class="popup search-popup">
    <div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocorrect="off" autocapitalize="none"
           placeholder="搜索..." spellcheck="false"
           type="text" id="search-input">
  </div>
  <span class="popup-btn-close">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div id="search-result"></div>

</div>
<div class="search-pop-overlay"></div>

  </div>
</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>
  <div class="reading-progress-bar"></div>
  <a role="button" class="book-mark-link book-mark-link-fixed"></a>

  <span class="exturl github-corner" data-url="aHR0cHM6Ly9naXRodWIuY29tL3d6YzU3MDczODIwNQ==" title="Follow me on GitHub" aria-label="Follow me on GitHub"><svg width="80" height="80" viewBox="0 0 250 250" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></span>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content">
            

  <div class="posts-expand">
      
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block " lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://wzc570738205.github.io/2016/12/10/html%E6%A0%87%E7%AD%BE%E4%B8%8B/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/logo.png">
      <meta itemprop="name" content="王志超">
      <meta itemprop="description" content="记录前端的点点滴滴">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="王志超的博客">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          html标签下
        </h2>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2016-12-10 12:59:18" itemprop="dateCreated datePublished" datetime="2016-12-10T12:59:18+00:00">2016-12-10</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2020-01-20 07:16:25" itemprop="dateModified" datetime="2020-01-20T07:16:25+00:00">2020-01-20</time>
              </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/%E5%89%8D%E7%AB%AF%E7%9F%A5%E8%AF%86/" itemprop="url" rel="index">
                    <span itemprop="name">前端知识</span>
                  </a>
                </span>
            </span>

          
  
  <span class="post-meta-item">
    
      <span class="post-meta-item-icon">
        <i class="fa fa-comment-o"></i>
      </span>
      <span class="post-meta-item-text">Valine：</span>
    
    <a title="valine" href="/2016/12/10/html%E6%A0%87%E7%AD%BE%E4%B8%8B/#comments" itemprop="discussionUrl">
      <span class="post-comments-count valine-comment-count" data-xid="/2016/12/10/html%E6%A0%87%E7%AD%BE%E4%B8%8B/" itemprop="commentCount"></span>
    </a>
  </span>
  
  

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <h2 id="本文主要内容"><a href="#本文主要内容" class="headerlink" title="本文主要内容"></a>本文主要内容</h2><ul>
<li>列表标签：<code>&lt;ul&gt;</code>、<code>&lt;OL&gt;</code>、<code>&lt;dl&gt;</code></li>
<li>表格标签：<code>&lt;table&gt;</code></li>
<li>框架标签及内嵌框架<code>&lt;iframe&gt;</code></li>
<li>表单标签：<code>&lt;form&gt;</code></li>
<li>多媒体标签</li>
<li>滚动字幕标签：<code>&lt;marquee&gt;</code><a id="more"></a>
<div class="note success no-icon">
            <p>欢迎加入前端交流群：<a href="//shang.qq.com/wpa/qunwpa?idkey=f528775f242a7c39fe8512383febb8990e621bf97354c2fb82f6832097b7c501" target="_blank" rel="noopener">749539640</a> </p>
          </div>
<h2 id="列表标签"><a href="#列表标签" class="headerlink" title="列表标签"></a>列表标签</h2></li>
</ul>
<p>列表标签分为三种。</p>
<h3 id="1、无序列表-lt-ul-gt-，无序列表中的每一项是-lt-li-gt"><a href="#1、无序列表-lt-ul-gt-，无序列表中的每一项是-lt-li-gt" class="headerlink" title="1、无序列表&lt;ul&gt;，无序列表中的每一项是&lt;li&gt;"></a>1、无序列表<code>&lt;ul&gt;</code>，无序列表中的每一项是<code>&lt;li&gt;</code></h3><p>英文单词解释如下：</p>
<ul>
<li>ul：unordered list，“无序列表”的意思。</li>
<li>li：list item，“列表项”的意思。</li>
</ul>
<p>例如：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">ul</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span>默认1<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span>默认2<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span>默认3<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">ul</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>效果：</p>
<p><img src="http://img.smyhvae.com/2015-10-02-cnblogs_html_01.png" alt=""></p>
<p>注意：</p>
<ul>
<li>li不能单独存在，必须包裹在ul里面；反过来说，ul的“儿子”不能是别的东西，只能有li。</li>
<li>我们这里再次强调，ul的作用，并不是给文字增加小圆点的，而是增加无序列表的“语义”的。</li>
</ul>
<p><strong>属性：</strong></p>
<ul>
<li><code>type=&quot;属性值&quot;</code>。属性值可以选： <code>disc</code>(实心原点，默认)，<code>square</code>(实心方点)，<code>circle</code>(空心圆)。<br>效果如下：</li>
</ul>
<p><img src="http://img.smyhvae.com/2015-10-02-cnblogs_html_02_1.png" alt=""></p>
<p>不光是<code>&lt;ul&gt;</code>标签有<code>type</code>属性，<code>&lt;ul&gt;</code>里面的<code>&lt;li&gt;</code>标签也有<code>type</code>属性（虽然说这种写法很少见）。效果如下：</p>
<p><img src="http://img.smyhvae.com/2015-10-02-cnblogs_html_03.png" alt=""></p>
<p>注意：项目符号可以是图片，需要通过CSS设置<code>&lt;li&gt;</code>标记的背景图片来实现(CSS中讲)。</p>
<p>当然了，列表之间是可以<strong>嵌套</strong>的。我们来举个例子。代码：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line"> <span class="tag">&lt;<span class="name">ul</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">li</span>&gt;</span><span class="tag">&lt;<span class="name">b</span>&gt;</span>北京市<span class="tag">&lt;/<span class="name">b</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">ul</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">li</span>&gt;</span>海淀区<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">li</span>&gt;</span>朝阳区<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">li</span>&gt;</span>东城区<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line"></span><br><span class="line">	<span class="tag">&lt;/<span class="name">ul</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">li</span>&gt;</span><span class="tag">&lt;<span class="name">b</span>&gt;</span>广州市<span class="tag">&lt;/<span class="name">b</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">ul</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">li</span>&gt;</span>天河区<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">li</span>&gt;</span>越秀区<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;/<span class="name">ul</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">ul</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>效果：</p>
<p><img src="http://img.smyhvae.com/2015-10-01-cnblogs_html_40.png" alt=""></p>
<p><strong>css 属性</strong>：</p>
<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-tag">list-style-position</span>: <span class="selector-tag">inside</span>   <span class="comment">/* 给 ul 设置这个属性后，将小圆点包含在 li 元素的内部 */</span></span><br></pre></td></tr></table></figure>

<h4 id="ul标签实际应用场景："><a href="#ul标签实际应用场景：" class="headerlink" title="ul标签实际应用场景："></a>ul标签实际应用场景：</h4><p>场景1、导航条：</p>
<p><img src="http://img.smyhvae.com/20170704_1717.png" alt=""></p>
<p>场景2、li 里面放置的内容可能很多：</p>
<p><img src="http://img.smyhvae.com/20170704_1719.png" alt=""></p>
<p>声明：ul的儿子，只能是li。但是li是一个容器级标签，<strong>li里面什么都能放，甚至可以再放一个ul</strong>。</p>
<h3 id="2、有序列表-lt-OL-gt-，里面的每一项是-lt-li-gt"><a href="#2、有序列表-lt-OL-gt-，里面的每一项是-lt-li-gt" class="headerlink" title="2、有序列表&lt;OL&gt;，里面的每一项是&lt;li&gt;"></a>2、有序列表<code>&lt;OL&gt;</code>，里面的每一项是<code>&lt;li&gt;</code></h3><p>英文单词：Ordered List。</p>
<p>例如：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">ol</span> &gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span>呵呵哒1<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span>呵呵哒2<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span>呵呵哒3<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">ol</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>效果：</p>
<p><img src="http://img.smyhvae.com/2015-10-02-cnblogs_html_04.png" alt=""></p>
<p><strong>属性：</strong></p>
<ul>
<li><code>type=&quot;属性值&quot;</code>。属性值可以是：1(阿拉伯数字，默认)、a、A、i、I。结合<code>start</code>属性表示<code>从几开始</code>。</li>
</ul>
<p>举例：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">ol</span> <span class="attr">type</span>=<span class="string">"1"</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span>呵呵<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span>呵呵<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span>呵呵<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">ol</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">ol</span> <span class="attr">type</span>=<span class="string">"a"</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span>嘿嘿<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span>嘿嘿<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span>呵呵<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">ol</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">ol</span> <span class="attr">type</span>=<span class="string">"i"</span> <span class="attr">start</span>=<span class="string">"4"</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span>哈哈<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span>哈哈<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span>哈哈<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">ol</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">ol</span> <span class="attr">type</span>=<span class="string">"I"</span> <span class="attr">start</span>=<span class="string">"10"</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span>么么<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span>么么<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span>么么<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">ol</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>效果如下：<br><img src="http://img.smyhvae.com/2015-10-02-cnblogs_html_07.png" alt=""></p>
<p>和无序列表一样，有序列表也是可以嵌套的哦，这里就不举类似的例子了。</p>
<p>ol和ul就是语义不一样，怎么使用都是一样的。<br>ol里面只能有li，li必须被ol包裹。li是容器级。</p>
<p>ol这个东西用的不多，如果想表达顺序，大家一般也用ul。举例如下：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">ul</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span>1. 小苹果<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span>2. 月亮之上<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span>3. 最炫民族风<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">ul</span>&gt;</span></span><br></pre></td></tr></table></figure>

<h3 id="3、定义列表-lt-dl-gt"><a href="#3、定义列表-lt-dl-gt" class="headerlink" title="3、定义列表&lt;dl&gt;"></a>3、定义列表<code>&lt;dl&gt;</code></h3><blockquote>
<p>定义列表的作用非常大。</p>
</blockquote>
<p><code>&lt;dl&gt;</code>英文单词：definition list，没有属性。dl的子元素只能是dt和dd。</p>
<ul>
<li><code>&lt;dt&gt;</code>：definition title 列表的标题，这个标签是必须的</li>
<li><code>&lt;dd&gt;</code>：definition description 列表的列表项，如果不需要它，可以不加</li>
</ul>
<p>备注：dt、dd只能在dl里面；dl里面只能有dt、dd。</p>
<p>举例：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dl</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">dt</span>&gt;</span>第一条<span class="tag">&lt;/<span class="name">dt</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">dd</span>&gt;</span>你若是觉得你有实力和我玩，良辰不介意奉陪到底<span class="tag">&lt;/<span class="name">dd</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">dd</span>&gt;</span>我会让你明白，我从不说空话<span class="tag">&lt;/<span class="name">dd</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">dd</span>&gt;</span>我是本地的，我有一百种方式让你呆不下去；而你，无可奈何<span class="tag">&lt;/<span class="name">dd</span>&gt;</span></span><br><span class="line"></span><br><span class="line">	<span class="tag">&lt;<span class="name">dt</span>&gt;</span>第二条<span class="tag">&lt;/<span class="name">dt</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">dd</span>&gt;</span>良辰最喜欢对那些自认能力出众的人出手<span class="tag">&lt;/<span class="name">dd</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">dd</span>&gt;</span>你可以继续我行我素，不过，你的日子不会很舒心<span class="tag">&lt;/<span class="name">dd</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">dd</span>&gt;</span>你只要记住，我叫叶良辰<span class="tag">&lt;/<span class="name">dd</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">dd</span>&gt;</span>不介意陪你玩玩<span class="tag">&lt;/<span class="name">dd</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">dd</span>&gt;</span>良辰必有重谢<span class="tag">&lt;/<span class="name">dd</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">dl</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>效果：</p>
<p><img src="http://img.smyhvae.com/2015-10-02-cnblogs_html_09.png" alt=""></p>
<p>上图可以看出，定义列表表达的语义是两层：</p>
<ul>
<li>（1）是一个列表，列出了几个dd项目</li>
<li>（2）每一个词儿都有自己的描述项。</li>
</ul>
<p>备注：dd是描述dt的。</p>
<p>定义列表用法非常灵活，可以一个dt配很多dd：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dl</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">dt</span>&gt;</span>北京<span class="tag">&lt;/<span class="name">dt</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">dd</span>&gt;</span>国家首都，政治文化中心<span class="tag">&lt;/<span class="name">dd</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">dd</span>&gt;</span>污染很严重，PM2.0天天报表<span class="tag">&lt;/<span class="name">dd</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">dt</span>&gt;</span>上海<span class="tag">&lt;/<span class="name">dt</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">dd</span>&gt;</span>魔都，有外滩、东方明珠塔、黄浦江<span class="tag">&lt;/<span class="name">dd</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">dt</span>&gt;</span>广州<span class="tag">&lt;/<span class="name">dt</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">dd</span>&gt;</span>中国南大门，有珠江、小蛮腰<span class="tag">&lt;/<span class="name">dd</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dl</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>还可以拆开，让每一个dl里面只有一个dt和dd，这样子感觉清晰一些：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dl</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">dt</span>&gt;</span>北京<span class="tag">&lt;/<span class="name">dt</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">dd</span>&gt;</span>国家首都，政治文化中心<span class="tag">&lt;/<span class="name">dd</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">dd</span>&gt;</span>污染很严重，PM2.0天天报表<span class="tag">&lt;/<span class="name">dd</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dl</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">dl</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">dt</span>&gt;</span>上海<span class="tag">&lt;/<span class="name">dt</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">dd</span>&gt;</span>魔都，有外滩、东方明珠塔、黄浦江<span class="tag">&lt;/<span class="name">dd</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dl</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">dl</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">dt</span>&gt;</span>广州<span class="tag">&lt;/<span class="name">dt</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">dd</span>&gt;</span>中国南大门，有珠江、小蛮腰<span class="tag">&lt;/<span class="name">dd</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dl</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>真实案例：（京东最下方）</p>
<p><img src="http://img.smyhvae.com/20170704_1727.png" alt=""></p>
<p>上图中的结构如下：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dl</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">dt</span>&gt;</span>购物指南<span class="tag">&lt;/<span class="name">dt</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">dd</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">"#"</span>&gt;</span>购物流程<span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">"#"</span>&gt;</span>会员介绍<span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">"#"</span>&gt;</span>生活旅行/团购<span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">"#"</span>&gt;</span>常见问题<span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">"#"</span>&gt;</span>大家电<span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">"#"</span>&gt;</span>联系客服<span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;/<span class="name">dd</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dl</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">dl</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">dt</span>&gt;</span>配送方式<span class="tag">&lt;/<span class="name">dt</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">dd</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">"#"</span>&gt;</span>上门自提<span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">"#"</span>&gt;</span>211限时达<span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">"#"</span>&gt;</span>配送服务查询<span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">"#"</span>&gt;</span>配送费收取标准<span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">"#"</span>&gt;</span>海外配送<span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;/<span class="name">dd</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dl</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>京东商品分类如下：</p>
<p><img src="http://img.smyhvae.com/20170704_1729.png" alt=""></p>
<p>dt、dd都是容器级标签，想放什么都可以。所以，现在就应该更加清晰的知道：用什么标签，不是根据样子来决定，而是语义（语义本质上是结构）。</p>
<h2 id="表格标签"><a href="#表格标签" class="headerlink" title="表格标签"></a>表格标签</h2><p>表格标签用<code>&lt;table&gt;</code>表示。<br>一个表格<code>&lt;table&gt;</code>是由每行<code>&lt;tr&gt;</code>组成的，每行是由每个单元格<code>&lt;td&gt;</code>组成的。<br>所以我们要记住，一个表格是由行组成的（行是由列组成的），而不是由行和列组成的。<br>在以前，要想固定标签的位置，唯一的方法就是表格。现在可以通过CSS定位的功能来实现。但是现在在做页面的时候，表格作用还是有一些的。</p>
<p>例如，一行的单元格：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">table</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">tr</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">td</span>&gt;</span><span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">td</span>&gt;</span><span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">td</span>&gt;</span><span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">td</span>&gt;</span><span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;/<span class="name">tr</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">table</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>上面的表格中没有加文字，所以在生成的网页中什么都看不到。<br>例如，3行4列的单元格：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">table</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">tr</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">td</span>&gt;</span>生命壹号<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">td</span>&gt;</span>23<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">td</span>&gt;</span>男<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">td</span>&gt;</span>黄冈<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;/<span class="name">tr</span>&gt;</span></span><br><span class="line"></span><br><span class="line">	<span class="tag">&lt;<span class="name">tr</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">td</span>&gt;</span>许嵩<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">td</span>&gt;</span>29<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">td</span>&gt;</span>男<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">td</span>&gt;</span>安徽<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;/<span class="name">tr</span>&gt;</span></span><br><span class="line"></span><br><span class="line">	<span class="tag">&lt;<span class="name">tr</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">td</span>&gt;</span>邓紫棋<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">td</span>&gt;</span>23<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">td</span>&gt;</span>女<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">td</span>&gt;</span>香港<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;/<span class="name">tr</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">table</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>效果：</p>
<p><img src="http://img.smyhvae.com/2015-10-02-cnblogs_html_10.png" alt=""></p>
<p>上图中的表格好像没看到边框呀，不急，接下来看看<code>&lt;table&gt;</code>标签的属性。</p>
<p><strong><code>&lt;table&gt;</code>的属性：</strong></p>
<ul>
<li><code>border</code>：边框。像素为单位。</li>
<li><code>style=&quot;border-collapse:collapse;&quot;</code>：单元格的线和表格的边框线合并（表格的两边框合并为一条）</li>
<li><code>width</code>：宽度。像素为单位。</li>
<li><code>height</code>：高度。像素为单位。</li>
<li><code>bordercolor</code>：表格的边框颜色。</li>
<li><code>align</code>：<strong>表格</strong>的水平对齐方式。属性值可以填：left right center。<br>注意：这里不是设置表格里内容的对齐方式，如果想设置内容的对齐方式，要对单元格标签<code>&lt;td&gt;</code>进行设置）</li>
<li><code>cellpadding</code>：单元格内容到边的距离，像素为单位。默认情况下，文字是紧挨着左边那条线的，即默认情况下的值为0。<br>注意不是单元格内容到四条边的距离哈，而是到一条边的距离，默认是与左边那条线的距离。如果设置属性<code>dir=&quot;rtl&quot;</code>，那就指的是内容到右边那条线的距离。</li>
<li><code>cellspacing</code>：单元格和单元格之间的距离（外边距），像素为单位。默认情况下的值为0</li>
<li><code>bgcolor=&quot;#99cc66&quot;</code>：表格的背景颜色。</li>
<li><code>background=&quot;路径src/...&quot;</code>：背景图片。<br>背景图片的优先级大于背景颜色。</li>
<li><code>bordercolorlight</code>：表格的上、左边框，以及单元格的右、下边框的颜色</li>
<li><code>bordercolordark</code>：表格的右、下边框，以及单元格的上、左的边框的颜色<br>这两个属性的目的是为了设置3D的效果。</li>
<li><code>dir</code>：公有属性，单元格内容的排列方式(direction)。 可以 取值：<code>ltr</code>：从左到右（left to right，默认），<code>rtl</code>：从右到左（right to left）<br>既然说<code>dir</code>是共有属性，如果把这个属性放在任意标签中，那表明这个标签的位置可能会从右开始排列。</li>
</ul>
<p>单元格带边框的效果：</p>
<p><img src="http://img.smyhvae.com/2015-10-02-cnblogs_html_11.png" alt=""></p>
<p>备注：表格中很细表格边线的制作，CSS的写法：</p>
<figure class="highlight"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">style="border-collapse:collapse;"</span><br></pre></td></tr></table></figure>


<h3 id="lt-tr-gt-：行"><a href="#lt-tr-gt-：行" class="headerlink" title="&lt;tr&gt;：行"></a><code>&lt;tr&gt;</code>：行</h3><p>一个表格就是一行一行组成的。</p>
<p><strong>属性：</strong></p>
<ul>
<li><code>dir</code>：公有属性，设置这一行单元格内容的排列方式。可以取值：<ul>
<li><code>ltr</code>：从左到右（left to right，默认）<ul>
<li><code>rtl</code>：从右到左（right to left）</li>
</ul>
</li>
</ul>
</li>
<li><code>bgcolor</code>：设置这一行的单元格的背景色。<br>注：没有background属性，即：无法设置这一行的背景图片，如果非要设置，可以用css实现。</li>
<li><code>height</code>：一行的高度</li>
<li><code>align=&quot;center&quot;</code>：一行的内容水平居中显示，取值：left、center、right</li>
<li><code>valign=&quot;center&quot;</code>：一行的内容垂直居中，取值：top、middle、bottom</li>
</ul>
<h3 id="lt-td-gt-：单元格"><a href="#lt-td-gt-：单元格" class="headerlink" title="&lt;td&gt;：单元格"></a><code>&lt;td&gt;</code>：单元格</h3><p><strong>属性：</strong></p>
<ul>
<li><code>align</code>：内容的横向对齐方式。属性值可以填：left right center。如果想让每个单元格的内容都居中，这个属性太麻烦了，以后用css来解决。</li>
<li><code>valign</code>：内容的纵向对齐方式。属性值可以填：top middle bottom</li>
<li><code>width</code>：绝对值或者相对值(%)</li>
<li><code>height</code>：单元格的高度</li>
<li><code>bgcolor</code>：设置这个单元格的背景色。</li>
<li><code>background</code>：设置这个单元格的背景图片。</li>
</ul>
<h3 id="单元格的合并"><a href="#单元格的合并" class="headerlink" title="单元格的合并"></a>单元格的合并</h3><p>单元格的属性：</p>
<ul>
<li><code>colspan</code>：横向合并。例如<code>colspan=&quot;2&quot;</code>表示当前单元格在水平方向上要占据两个单元格的位置。</li>
<li><code>rowspan</code>：纵向合并。例如<code>rowspan=&quot;2&quot;</code>表示当前单元格在垂直方向上要占据两个单元格的位置。</li>
</ul>
<p>效果举例：（横向合并）</p>
<p><img src="http://img.smyhvae.com/2015-10-02-cnblogs_html_13.png" alt=""></p>
<p>效果举例：（纵向合并）</p>
<p><img src="http://img.smyhvae.com/2015-10-02-cnblogs_html_15.png" alt=""></p>
<h3 id="lt-th-gt-：加粗的单元格。相当于-lt-td-gt-lt-b-gt"><a href="#lt-th-gt-：加粗的单元格。相当于-lt-td-gt-lt-b-gt" class="headerlink" title="&lt;th&gt;：加粗的单元格。相当于&lt;td&gt; + &lt;b&gt;"></a><code>&lt;th&gt;</code>：加粗的单元格。相当于<code>&lt;td&gt;</code> + <code>&lt;b&gt;</code></h3><ul>
<li>属性同<code>&lt;td&gt;</code>标签。</li>
</ul>
<br>
### `<caption>`：表格的标题。使用时和`tr`标签并列
 - 属性：`align`，表示标题相对于表格的位置。属性取值可以是：left、center、right、top、bottom
效果：

<p><img src="http://img.smyhvae.com/2015-10-02-cnblogs_html_16.png" alt=""></p>
<h3 id="表格的-lt-thead-gt-标签、-lt-tbody-gt-标签、-lt-tfoot-gt-标签"><a href="#表格的-lt-thead-gt-标签、-lt-tbody-gt-标签、-lt-tfoot-gt-标签" class="headerlink" title="表格的&lt;thead&gt;标签、&lt;tbody&gt;标签、&lt;tfoot&gt;标签"></a>表格的<code>&lt;thead&gt;</code>标签、<code>&lt;tbody&gt;</code>标签、<code>&lt;tfoot&gt;</code>标签</h3><p>这三个标签有与没有的区别：</p>
<ul>
<li>1、如果写了，那么这三个部分的<strong>代码顺序可以任意</strong>，浏览器显示的时候还是按照thead、tbody、tfoot的顺序依次来显示内容。如果不写thead、tbody、tfoot，那么浏览器解析并显示表格内容的时候是从按照代码的从上到下的顺序来显示。</li>
<li>2、当表格非常大内容非常多的时候，如果用thead、tbody、tfoot标签的话，那么<strong>数据可以边获取边显示</strong>。如果不写，则必须等表格的内容全部从服务器获取完成才能显示出来。</li>
</ul>
<p>举例：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">table</span> <span class="attr">border</span>=<span class="string">"1"</span>&gt;</span></span><br><span class="line"></span><br><span class="line">	<span class="tag">&lt;<span class="name">tbody</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">tr</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">td</span>&gt;</span>生命壹号<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">td</span>&gt;</span>23<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">td</span>&gt;</span>男<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">td</span>&gt;</span>黄冈<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;/<span class="name">tr</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;/<span class="name">tbody</span>&gt;</span></span><br><span class="line"></span><br><span class="line">	<span class="tag">&lt;<span class="name">tfoot</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">tr</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">td</span>&gt;</span>许嵩<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">td</span>&gt;</span>29<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">td</span>&gt;</span>男<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">td</span>&gt;</span>安徽<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;/<span class="name">tr</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;/<span class="name">tfoot</span>&gt;</span></span><br><span class="line"></span><br><span class="line">	<span class="tag">&lt;<span class="name">thead</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">tr</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">td</span>&gt;</span>邓紫棋<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">td</span>&gt;</span>23<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">td</span>&gt;</span>女<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">td</span>&gt;</span>香港<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;/<span class="name">tr</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;/<span class="name">thead</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">table</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>效果：</p>
<p><img src="http://img.smyhvae.com/2015-10-02-cnblogs_html_17.png" alt=""></p>
<h2 id="框架标签"><a href="#框架标签" class="headerlink" title="框架标签"></a>框架标签</h2><p>如果我们希望在一个网页中显示多个页面，那框架标签就派上用场了。</p>
<blockquote>
<ul>
<li>注意，框架标签不能放在<code>&lt;body&gt;</code>标签里面，因为<code>&lt;body&gt;</code>标签代表的只是一个页面，而框架标签代表的是多个页面。于是：<code>&lt;frameset&gt;</code>和<code>&lt;body&gt;</code>只能二选一。</li>
<li>框架的集合用<code>&lt;frameset&gt;</code>表示，然后在<code>&lt;frameset&gt;</code>集合里放入一个一个的框架<code>&lt;frame&gt;</code></li>
</ul>
</blockquote>
<h3 id="lt-frameset-gt-：框架的集合"><a href="#lt-frameset-gt-：框架的集合" class="headerlink" title="&lt;frameset&gt;：框架的集合"></a><code>&lt;frameset&gt;</code>：框架的集合</h3><p>一个框架的集合可以包含多个框架或框架的集合。<strong>属性：</strong></p>
<ul>
<li><code>rows</code>：水平分割，将框架分为上下部分。写法有两种：</li>
</ul>
<p>1、绝对值写法：<code>rows=&quot;200,*&quot;</code>  其中<code>*</code>代表剩余的。这里其实包含了两个框架：上面的框架占200个像素，下面的框架占剩下的部分。</p>
<p>2、相对值写法：<code>rows=&quot;30%,*&quot;</code>  其中<code>*</code>代表剩余的。这里其实包含了两个框架：上面的框架占30%，下面的框架占70%。</p>
<p>注：如果你想将框架分成很多行，在属性值里用逗号隔开就行了。</p>
<ul>
<li><code>cols</code>：垂直分割，将框架分为左右部分。写法有两种：</li>
</ul>
<p>1、绝对值写法：<code>cols=&quot;200,*&quot;</code>  其中<code>*</code>代表剩余的。这里其实包含了两个框架：左边的框架占200个像素，右边的框架占剩下的部分。</p>
<p>2、相对值写法：<code>cols=&quot;30%,*&quot;</code>  其中<code>*</code>代表剩余的。这里其实包含了两个框架：左边的框架占30%，右边的框架占70%。</p>
<p>注：如果你想将框架分成很多列，在属性值里用逗号隔开就行了。</p>
<p>效果：</p>
<p><img src="http://img.smyhvae.com/2015-10-02-cnblogs_html_26.png" alt=""></p>
<p>上图中，如果删掉页面right.html，显示效果如下：</p>
<p><img src="http://img.smyhvae.com/2015-10-02-cnblogs_html_27.png" alt=""></p>
<h3 id="lt-frame-gt-：框架"><a href="#lt-frame-gt-：框架" class="headerlink" title="&lt;frame&gt;：框架"></a><code>&lt;frame&gt;</code>：框架</h3><p>一个框架显示一个页面。</p>
<p><strong>属性：</strong></p>
<ul>
<li><code>scrolling=&quot;no&quot;</code>：是否需要滚动条。默认值是true。</li>
<li><code>noresize</code>：不可以改变框架大小。默认情况下，单个框架的边界是可以拖动的，这样的话，框架大小就不固定了。如果用了这个属性值，框架大小将固定。</li>
</ul>
<p>举例：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">frame</span> <span class="attr">src</span>=<span class="string">"top.html"</span> <span class="attr">noresize</span>&gt;</span><span class="tag">&lt;/<span class="name">frame</span>&gt;</span></span><br></pre></td></tr></table></figure>

<ul>
<li><p><code>bordercolor=&quot;#00FF00&quot;</code>：给框架的边框定义颜色。这个属性在框架集合<code>&lt;frameset&gt;</code>中同样适用。<br>颜色这个属性在IE浏览器中生效，但是在google浏览器中无效，不知道为啥。</p>
</li>
<li><p><code>frameborder=&quot;0&quot;</code>或<code>frameborder=&quot;1&quot;</code>：隐藏或显示边框（框架线）。</p>
</li>
<li><p><code>name</code>：给框架起一个名字。</p>
</li>
</ul>
<p>利用<code>name</code>这个属性，我们可以在框架里进行超链。</p>
<p>举例：</p>
<p><img src="http://img.smyhvae.com/2015-10-02-cnblogs_html_28.png" alt=""></p>
<p>效果：</p>
<p><img src="http://img.smyhvae.com/2015-10-02-cnblogs_html_gif3.gif" alt=""></p>
<h2 id="内嵌框架"><a href="#内嵌框架" class="headerlink" title="内嵌框架"></a>内嵌框架</h2><p>内嵌框架用<code>&lt;iframe&gt;</code>表示。<code>&lt;iframe&gt;</code>是<code>&lt;body&gt;</code>的子标记。</p>
<p>内嵌框架inner frame：嵌入在一个页面上的框架(仅仅IE、新版google浏览器支持，可能有其他浏览器也支持，暂时我不清楚)。</p>
<p><strong>属性：</strong></p>
<ul>
<li><code>src=&quot;subframe/the_second.html&quot;</code>：内嵌的那个页面</li>
<li><code>width=800</code>：宽度</li>
<li><code>height=“150</code>：高度</li>
<li><code>scrolling=&quot;no&quot;</code>：是否需要滚动条。默认值是true。</li>
<li><code>name=&quot;mainFrame&quot;</code>：窗口名称。公有属性。</li>
</ul>
<p>效果：</p>
<p><img src="http://img.smyhvae.com/2015-10-02-cnblogs_html_29.png" alt=""></p>
<p>内嵌框架举例：（在内嵌页面中切换显示不同的压面）</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"></span><br><span class="line">	<span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">"文字页面.html"</span> <span class="attr">target</span>=<span class="string">"myframe"</span>&gt;</span>默认显示文字页面<span class="tag">&lt;/<span class="name">a</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">"图片页面.html"</span> <span class="attr">target</span>=<span class="string">"myframe"</span>&gt;</span>点击进入图片页面<span class="tag">&lt;/<span class="name">a</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">"表格页面.html"</span> <span class="attr">target</span>=<span class="string">"myframe"</span>&gt;</span>点击进入表格页面<span class="tag">&lt;/<span class="name">a</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"></span><br><span class="line">	<span class="tag">&lt;<span class="name">iframe</span> <span class="attr">src</span>=<span class="string">"文字页面.html"</span> <span class="attr">width</span>=<span class="string">"400"</span> <span class="attr">height</span>=<span class="string">"400"</span> <span class="attr">name</span>=<span class="string">"myframe"</span>&gt;</span><span class="tag">&lt;/<span class="name">iframe</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">	嘿嘿</span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>效果演示：<br><img src="http://img.smyhvae.com/2015-10-02-cnblogs_html_GIF.gif" alt=""></p>
<h2 id="表单标签"><a href="#表单标签" class="headerlink" title="表单标签"></a>表单标签</h2><p>表单标签用<code>&lt;form&gt;</code>表示，用于与服务器的交互。表单就是收集用户信息的，就是让用户填写的、选择的。</p>
<p><strong>属性：</strong></p>
<ul>
<li><code>name</code>：表单的名称，用于JS来操作或控制表单时使用；</li>
<li><code>id</code>：表单的名称，用于JS来操作或控制表单时使用；</li>
<li><code>action</code>：指定表单数据的处理程序，一般是PHP，如：action=“login.php”</li>
<li><code>method</code>：表单数据的提交方式，一般取值：get(默认)和post</li>
</ul>
<p>注意：表单和表格嵌套时，是在<form>标记中套<table>标记。</p>
<p>form标签里面的action属性和method属性，在《Ajax》课程上给大家讲解。稍微说一下：action属性就是表示，表单将提交到哪里。 method属性表示用什么HTTP方法提交，有get、post两种。</p>
<p><strong>get提交和post提交的区别：</strong></p>
<p>GET方式：<br>将表单数据，以”name=value”形式追加到action指定的处理程序的后面，两者间用”?”隔开，每一个表单的”name=value”间用”&amp;”号隔开。<br>特点：只适合提交少量信息，并且不太安全(不要提交敏感数据)、提交的数据类型只限于ASCII字符。</p>
<p>POST方式：<br>将表单数据直接发送(隐藏)到action指定的处理程序。POST发送的数据不可见。Action指定的处理程序可以获取到表单数据。<br>特点：可以提交海量信息，相对来说安全一些，提交的数据格式是多样的(Word、Excel、rar、img)。</p>
<p><strong>Enctype：</strong><br>表单数据的编码方式(加密方式)，取值可以是：application/x-www-form-urlencoded、multipart/form-data。Enctype只能在POST方式下使用。</p>
<ul>
<li>Application/x-www-form-urlencoded：<strong>默认</strong>加密方式，除了上传文件之外的数据都可以</li>
<li>Multipart/form-data：<strong>上传附件时，必须使用这种编码方式</strong>。</li>
</ul>
<h3 id="lt-input-gt-：输入标签（文本框）"><a href="#lt-input-gt-：输入标签（文本框）" class="headerlink" title="&lt;input&gt;：输入标签（文本框）"></a><code>&lt;input&gt;</code>：输入标签（文本框）</h3><p>用于接收用户输入。</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">"text"</span> /&gt;</span></span><br></pre></td></tr></table></figure>

<p><strong>属性：</strong></p>
<ul>
<li><p><strong><code>type=&quot;属性值&quot;</code></strong>：文本类型。属性值可以是：</p>
<ul>
<li><code>text</code>（默认）</li>
<li><code>password</code>：密码类型</li>
<li><code>radio</code>：单选按钮，名字相同的按钮作为一组进行单选（单选按钮，天生是不能互斥的，如果想互斥，必须要有相同的name属性。name就是“名字”。<br>）。非常像以前的收音机，按下去一个按钮，其他的就抬起来了。所以叫做radio。</li>
<li><code>checkbox</code>：多选按钮，<strong>name 属性值相同的按钮</strong>作为一组进行选择。</li>
<li><code>checked</code>：将单选按钮或多选按钮默认处于选中状态。当<code>&lt;input&gt;</code>标签的<code>type=&quot;radio&quot;</code>时，可以用这个属性。属性值也是checked，可以省略。</li>
<li><code>hidden</code>：隐藏框，在表单中包含不希望用户看见的信息</li>
<li><code>button</code>：普通按钮，结合js代码进行使用。</li>
<li><code>submit</code>：提交按钮，传送当前表单的数据给服务器或其他程序处理。这个按钮不需要写value自动就会有“提交”文字。这个按钮真的有提交功能。点击按钮后，这个表单就会被提交到form标签的action属性中指定的那个页面中去。</li>
<li><code>reset</code>：重置按钮，清空当前表单的内容，并设置为最初的默认值</li>
<li><code>image</code>：图片按钮，和提交按钮的功能完全一致，只不过图片按钮可以显示图片。</li>
<li><code>file</code>：文件选择框。<br>提示：如果要限制上传文件的类型，需要配合JS来实现验证。对上传文件的安全检查：一是扩展名的检查，二是文件数据内容的检查。</li>
</ul>
<ul>
<li><p><strong><code>value=&quot;内容&quot;</code></strong>：文本框里的默认内容（已经被填好了的）</p>
</li>
<li><p><code>size=&quot;50&quot;</code>：表示文本框内可以显示<strong>五十个字符</strong>。一个英文或一个中文都算一个字符。<br>注意<strong>size属性值的单位不是像素哦</strong>。</p>
</li>
<li><p><code>readonly</code>：文本框只读，不能编辑。因为它的属性值也是readonly，所以属性值可以不写。<br>用了这个属性之后，在google浏览器中，光标点不进去；在IE浏览器中，光标可以点进去，但是文字不能编辑。</p>
</li>
<li><p><code>disabled</code>：文本框只读，不能编辑，光标点不进去。属性值可以不写。</p>
</li>
</ul>
</li>
</ul>
<blockquote>
<p>备注：HTML5中，input的类型又增加了很多（比如date、color，我们会在 html5 中讲到）。</p>
</blockquote>
<p><strong>举例</strong>：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">form</span>&gt;</span></span><br><span class="line">	姓名：<span class="tag">&lt;<span class="name">input</span> <span class="attr">value</span>=<span class="string">"呵呵"</span> &gt;</span>逗比<span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">	昵称：<span class="tag">&lt;<span class="name">input</span> <span class="attr">value</span>=<span class="string">"哈哈"</span> <span class="attr">readonly</span>=<span class="string">""</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">	名字：<span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">"text"</span> <span class="attr">value</span>=<span class="string">"name"</span> <span class="attr">disabled</span>=<span class="string">""</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">	密码：<span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">"password"</span> <span class="attr">value</span>=<span class="string">"pwd"</span> <span class="attr">size</span>=<span class="string">"50"</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">	性别：<span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">"radio"</span> <span class="attr">name</span>=<span class="string">"gender"</span> <span class="attr">id</span>=<span class="string">"radio1"</span> <span class="attr">value</span>=<span class="string">"male"</span> <span class="attr">checked</span>=<span class="string">""</span>&gt;</span>男</span><br><span class="line">		  <span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">"radio"</span> <span class="attr">name</span>=<span class="string">"gender"</span> <span class="attr">id</span>=<span class="string">"radio2"</span> <span class="attr">value</span>=<span class="string">"female"</span> &gt;</span>女<span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">	爱好：<span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">"checkbox"</span> <span class="attr">name</span>=<span class="string">"love"</span> <span class="attr">value</span>=<span class="string">"eat"</span>&gt;</span>吃饭</span><br><span class="line">		  <span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">"checkbox"</span> <span class="attr">name</span>=<span class="string">"love"</span> <span class="attr">value</span>=<span class="string">"sleep"</span>&gt;</span>睡觉</span><br><span class="line">		  <span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">"checkbox"</span> <span class="attr">name</span>=<span class="string">"love"</span> <span class="attr">value</span>=<span class="string">"bat"</span>&gt;</span>打豆豆</span><br><span class="line"><span class="tag">&lt;/<span class="name">form</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>效果：</p>
<p><img src="http://img.smyhvae.com/2015-10-02-cnblogs_html_33.png" alt=""></p>
<p>注意，多个个单选框的input标签中，name 的属性值可以相同，但是 <strong>id 的属性值必须是唯一的</strong>。我们知道，html的标签中，id的属性值是唯一的。</p>
<p><strong>四种按钮的举例</strong>：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">form</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">"button"</span> <span class="attr">value</span>=<span class="string">"普通按钮"</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">"submit"</span>  <span class="attr">value</span>=<span class="string">"提交按钮"</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">"reset"</span> <span class="attr">value</span>=<span class="string">"重置按钮"</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">"image"</span> <span class="attr">value</span>=<span class="string">"图片按钮1"</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">"image"</span> <span class="attr">src</span>=<span class="string">"1.jpg"</span> <span class="attr">width</span>=<span class="string">"800"</span> <span class="attr">value</span>=<span class="string">"图片按钮2"</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">"file"</span> <span class="attr">value</span>=<span class="string">"文件选择框"</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">form</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p><strong>前端开发工程师，重点关心页面的美、样式、板式、交互。至于数据的提供和比较重的业务逻辑，都是后台工程师做的事情。</strong></p>
<p>效果：</p>
<p><img src="http://img.smyhvae.com/2015-10-02-cnblogs_html_35.png" alt=""></p>
<h3 id="lt-select-gt-：下拉列表标签"><a href="#lt-select-gt-：下拉列表标签" class="headerlink" title="&lt;select&gt;：下拉列表标签"></a><code>&lt;select&gt;</code>：下拉列表标签</h3><p><code>&lt;select&gt;</code>标签里面的每一项用<code>&lt;option&gt;</code>表示。select就是“选择”，option“选项”。</p>
<p>select标签和ul、ol、dl一样，都是组标签。</p>
<p><strong><code>&lt;select&gt;</code>标签的属性：</strong></p>
<ul>
<li><code>multiple</code>：可以对下拉列表中的选项进行多选。没有属性值。</li>
<li><code>size=&quot;3&quot;</code>：如果属性值大于1，则列表为滚动视图。默认属性值为1，即下拉视图。</li>
</ul>
<p><strong><code>&lt;option&gt;</code>标签的属性：</strong></p>
<ul>
<li><code>selected</code>：预选中。没有属性值。</li>
</ul>
<p>举例：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">form</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">select</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">option</span>&gt;</span>小学<span class="tag">&lt;/<span class="name">option</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">option</span>&gt;</span>初中<span class="tag">&lt;/<span class="name">option</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">option</span>&gt;</span>高中<span class="tag">&lt;/<span class="name">option</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">option</span>&gt;</span>大学<span class="tag">&lt;/<span class="name">option</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">option</span> <span class="attr">selected</span>=<span class="string">""</span>&gt;</span>研究生<span class="tag">&lt;/<span class="name">option</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;/<span class="name">select</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">br</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"></span><br><span class="line">	<span class="tag">&lt;<span class="name">select</span> <span class="attr">size</span>=<span class="string">"3"</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">option</span>&gt;</span>小学<span class="tag">&lt;/<span class="name">option</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">option</span>&gt;</span>初中<span class="tag">&lt;/<span class="name">option</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">option</span>&gt;</span>高中<span class="tag">&lt;/<span class="name">option</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">option</span>&gt;</span>大学<span class="tag">&lt;/<span class="name">option</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">option</span>&gt;</span>研究生<span class="tag">&lt;/<span class="name">option</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;/<span class="name">select</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">br</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"></span><br><span class="line">	<span class="tag">&lt;<span class="name">select</span> <span class="attr">multiple</span>=<span class="string">""</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">option</span>&gt;</span>小学<span class="tag">&lt;/<span class="name">option</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">option</span>&gt;</span>初中<span class="tag">&lt;/<span class="name">option</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">option</span> <span class="attr">selected</span>=<span class="string">""</span>&gt;</span>高中<span class="tag">&lt;/<span class="name">option</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">option</span> <span class="attr">selected</span>=<span class="string">""</span>&gt;</span>大学<span class="tag">&lt;/<span class="name">option</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">option</span>&gt;</span>研究生<span class="tag">&lt;/<span class="name">option</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;/<span class="name">select</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">br</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">form</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>效果：</p>
<p><img src="http://img.smyhvae.com/2015-10-02-cnblogs_html_32.png" alt=""></p>
<h3 id="lt-textare-gt-标签：多行文本输入框"><a href="#lt-textare-gt-标签：多行文本输入框" class="headerlink" title="&lt;textare&gt;标签：多行文本输入框"></a><code>&lt;textare&gt;</code>标签：多行文本输入框</h3><p>text就是“文本”，area就是“区域”。</p>
<p><strong>属性：</strong></p>
<ul>
<li><code>value</code>：提交给服务器的值。</li>
<li><code>rows=&quot;4&quot;</code>：指定文本区域的行数。</li>
<li><code>cols=&quot;20&quot;</code>：指定文本区域的列数。</li>
<li><code>readonly</code>：只读。</li>
</ul>
<p>举例：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">form</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">textarea</span> <span class="attr">name</span>=<span class="string">"txtInfo"</span> <span class="attr">rows</span>=<span class="string">"4"</span> <span class="attr">cols</span>=<span class="string">"20"</span>&gt;</span>1、不爱摄影不懂设计的程序猿不是一个好的产品经理。<span class="tag">&lt;/<span class="name">textarea</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">form</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>上方代码解释：textarea这个标签，是个标签对儿。对儿里面不用写东西。如果写的话，就是这个框的默认文字。</p>
<p>效果：</p>
<p><img src="http://img.smyhvae.com/2015-10-02-cnblogs_html_34.png" alt=""></p>
<p>上图的红框部分表示，我在文本区域进行了换行，所以显示的效果也出现了空白。</p>
<h3 id="表单的语义化"><a href="#表单的语义化" class="headerlink" title="表单的语义化"></a>表单的语义化</h3><p>比如，我们在注册一个网站的信息的时候，有一部分是必填信息，有一部分是选填信息，这个时候可以利用表单的语义化。<br>举例：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">form</span>&gt;</span></span><br><span class="line"></span><br><span class="line">	<span class="tag">&lt;<span class="name">fieldset</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">legend</span>&gt;</span>账号信息<span class="tag">&lt;/<span class="name">legend</span>&gt;</span></span><br><span class="line">	姓名：<span class="tag">&lt;<span class="name">input</span> <span class="attr">value</span>=<span class="string">"呵呵"</span> &gt;</span>逗比<span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">	密码：<span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">"password"</span> <span class="attr">value</span>=<span class="string">"pwd"</span> <span class="attr">size</span>=<span class="string">"50"</span>&gt;</span><span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;/<span class="name">fieldset</span>&gt;</span></span><br><span class="line"></span><br><span class="line">	<span class="tag">&lt;<span class="name">fieldset</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">legend</span>&gt;</span>其他信息<span class="tag">&lt;/<span class="name">legend</span>&gt;</span></span><br><span class="line">	性别：<span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">"radio"</span> <span class="attr">name</span>=<span class="string">"gender"</span> <span class="attr">value</span>=<span class="string">"male"</span> <span class="attr">checked</span>=<span class="string">""</span>&gt;</span>男</span><br><span class="line">		  <span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">"radio"</span> <span class="attr">name</span>=<span class="string">"gender"</span> <span class="attr">value</span>=<span class="string">"female"</span> &gt;</span>女<span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">	爱好：<span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">"checkbox"</span> <span class="attr">name</span>=<span class="string">"love"</span> <span class="attr">value</span>=<span class="string">"eat"</span>&gt;</span>吃饭</span><br><span class="line">		  <span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">"checkbox"</span> <span class="attr">name</span>=<span class="string">"love"</span> <span class="attr">value</span>=<span class="string">"sleep"</span>&gt;</span>睡觉</span><br><span class="line">		  <span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">"checkbox"</span> <span class="attr">name</span>=<span class="string">"love"</span> <span class="attr">value</span>=<span class="string">"bat"</span>&gt;</span>打豆豆</span><br><span class="line">	<span class="tag">&lt;/<span class="name">fieldset</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">form</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>效果：</p>
<p><img src="http://img.smyhvae.com/20151002_36.png" alt=""></p>
<h3 id="lt-label-gt-标签"><a href="#lt-label-gt-标签" class="headerlink" title="&lt;label&gt;标签"></a><code>&lt;label&gt;</code>标签</h3><p>我们先来看下面一段代码：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">"radio"</span> <span class="attr">name</span>=<span class="string">"sex"</span> /&gt;</span> 男</span><br><span class="line"><span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">"radio"</span> <span class="attr">name</span>=<span class="string">"sex"</span> /&gt;</span> 女</span><br></pre></td></tr></table></figure>

<p>对于上面这样的单选框，我们只有点击那个单选框（小圆圈）才可以选中，点击“男”、“女”这两个文字时是无法选中的；于是，label标签派上了用场。</p>
<p>本质上来讲，“男”、“女”这两个文字和input标签时没有关系的，而label就是解决这个问题的。我们可以通过label把input和汉字包裹起来作为整体。</p>
<p>解决方法如下：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">"radio"</span> <span class="attr">name</span>=<span class="string">"sex"</span> <span class="attr">id</span>=<span class="string">"nan"</span> /&gt;</span> <span class="tag">&lt;<span class="name">label</span> <span class="attr">for</span>=<span class="string">"nan"</span>&gt;</span>男<span class="tag">&lt;/<span class="name">label</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">"radio"</span> <span class="attr">name</span>=<span class="string">"sex"</span> <span class="attr">id</span>=<span class="string">"nv"</span>  /&gt;</span> <span class="tag">&lt;<span class="name">label</span> <span class="attr">for</span>=<span class="string">"nv"</span>&gt;</span>女<span class="tag">&lt;/<span class="name">label</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>上方代码中，让label标签的<strong>for 属性值</strong>，和 input 标签的 <strong>id 属性值相同</strong>，那么这个label和input就有绑定关系了。</p>
<p>当然了，复选框也有label：（任何表单元素都有label）</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">"checkbox"</span> <span class="attr">id</span>=<span class="string">"kk"</span> /&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">label</span> <span class="attr">for</span>=<span class="string">"kk"</span>&gt;</span>10天内免登陆<span class="tag">&lt;/<span class="name">label</span>&gt;</span></span><br></pre></td></tr></table></figure>

<h2 id="多媒体标签"><a href="#多媒体标签" class="headerlink" title="多媒体标签"></a>多媒体标签</h2><p><strong>声明：</strong><br>多媒体包含：音频、视频、Flash。网页上的多媒体基本都是Flash格式的。<br>.wmv、.dat、.mob、.rmvb等视频格式，在网页上不能直接播放，需要安装第三方的插件，才可以播放。不同的浏览器，播客上述视频格式，所使用插件参数又不一样。<br>上述格式视频一般文件较大，不利于网络下载播放。<br>一般情况下，是将其它的视频格式，转成Flash来在网页上播放。转换软件：格式工厂等。<br>Flash格式的视频兼容性非常好，Flash格式的文件很小。</p>
<h3 id="lt-bgsound-gt-标签：播放背景音乐"><a href="#lt-bgsound-gt-标签：播放背景音乐" class="headerlink" title="&lt;bgsound&gt;标签：播放背景音乐"></a><code>&lt;bgsound&gt;</code>标签：播放背景音乐</h3><p><strong>属性：</strong></p>
<ul>
<li><code>src=&quot;音乐文件的路径&quot;</code></li>
<li><code>loop=&quot;-1&quot;</code>：属性值代表播放次数，-1代表循环播放。</li>
</ul>
<p>举例：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">bgsound</span> <span class="attr">src</span>=<span class="string">"王菲 - 清风徐来.mp3"</span>&gt;</span><span class="tag">&lt;/<span class="name">bgsound</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>运行效果：<br>打开网页后，在IE 8中播放正常，播放时网页上显示一片空白。在google浏览器中无法播放。<br><br></p>
<h3 id="lt-embed-gt-标签：播放多媒体文件（音频、视频等）"><a href="#lt-embed-gt-标签：播放多媒体文件（音频、视频等）" class="headerlink" title="&lt;embed&gt;标签：播放多媒体文件（音频、视频等）"></a><code>&lt;embed&gt;</code>标签：播放多媒体文件（音频、视频等）</h3><p>主要应用Netscape浏览器，它不是W3C规范。</p>
<blockquote>
<p>备注：视频格式可以支持 mp4、wav等，但不是所有视频格式都支持。</p>
</blockquote>
<p><strong>属性：</strong></p>
<ul>
<li><code>src=&quot;多媒体文件的路径&quot;</code></li>
<li><code>loop=&quot;-1&quot;</code>：属性值代表播放次数，-1代表循环播放。</li>
<li><code>autostart=&quot;false&quot;</code>：打开网页时，禁止自动播放。默认值是true。</li>
<li><code>volume=&quot;100&quot;</code>：设置默认的音量大小，测试发现这个值好像不起作用哦。</li>
<li>width：指Flash文件的宽度</li>
<li>height：指Flash文件的高度</li>
<li>quality：指Flash的播放质量，质量有高有低 hight  low</li>
<li>pluginspage：如果指定的Flash插件不存在，则从pluginspage指定的地方进行下载。</li>
<li>type：指定Flash的文件格式类型</li>
<li>wmode：指Flash的背景是否可以透明，取值：transparent是透明的</li>
</ul>
<p><code>&lt;embed&gt;</code>标签播放音频举例：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">embed</span> <span class="attr">src</span>=<span class="string">"王菲 - 清风徐来.mp3"</span>&gt;</span><span class="tag">&lt;/<span class="name">embed</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>IE 8中的运行效果：</p>
<p><img src="http://img.smyhvae.com/2015-10-02-cnblogs_html_37.png" alt=""></p>
<p>google浏览器中的运行效果：</p>
<p><img src="http://img.smyhvae.com/2015-10-02-cnblogs_html_38.png" alt=""></p>
<p>注：在HTML5中新增了<code>&lt;video&gt;</code>标签播放视频。<br><br></p>
<h3 id="lt-object-gt-标签：播放多媒体文件（音频、视频等）"><a href="#lt-object-gt-标签：播放多媒体文件（音频、视频等）" class="headerlink" title="&lt;object&gt;标签：播放多媒体文件（音频、视频等）"></a><code>&lt;object&gt;</code>标签：播放多媒体文件（音频、视频等）</h3><p>主要应用IE浏览器，它是W3C规范。</p>
<p><strong>属性：</strong></p>
<ul>
<li><code>classid</code>：指定Flash插件的ID号，一般存在于注册表中。</li>
<li><code>codebase</code>：如果Flash插件不存在，则从codebase指定的地址下载。</li>
<li><code>&lt;param&gt;</code>标签的主要作用：设置具体的详细参数。</li>
</ul>
<p><strong>总结：在网页中插入Flash时，为了同时兼容多种浏览器，需要将<code>&lt;object&gt;</code>标签和<code>&lt;embed&gt;</code>标签标记一起使用，但使用的顺序是：<code>&lt;object&gt;</code>中嵌套<code>&lt;embed&gt;</code>标记。</strong><br>举例：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">object</span> <span class="attr">classid</span>=<span class="string">"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"</span> <span class="attr">codebase</span>=<span class="string">"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"</span> <span class="attr">width</span>=<span class="string">"778"</span> <span class="attr">height</span>=<span class="string">"202"</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">param</span> <span class="attr">name</span>=<span class="string">"movie"</span> <span class="attr">value</span>=<span class="string">"images/banner.swf"</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">param</span> <span class="attr">name</span>=<span class="string">"quality"</span> <span class="attr">value</span>=<span class="string">"high"</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">param</span> <span class="attr">name</span>=<span class="string">"wmode"</span> <span class="attr">value</span>=<span class="string">"transparent"</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">embed</span> <span class="attr">src</span>=<span class="string">"images/banner.swf"</span> <span class="attr">width</span>=<span class="string">"778"</span> <span class="attr">height</span>=<span class="string">"202"</span> <span class="attr">quality</span>=<span class="string">"high"</span> <span class="attr">pluginspage</span>=<span class="string">"http://www.macromedia.com/go/getflashplayer"</span> <span class="attr">type</span>=<span class="string">"application/x-shockwave-flash"</span> <span class="attr">wmode</span>=<span class="string">"transparent"</span>&gt;</span><span class="tag">&lt;/<span class="name">embed</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">object</span>&gt;</span></span><br></pre></td></tr></table></figure>

<h2 id="lt-marquee-gt-：滚动字幕标签"><a href="#lt-marquee-gt-：滚动字幕标签" class="headerlink" title="&lt;marquee&gt;：滚动字幕标签"></a><code>&lt;marquee&gt;</code>：滚动字幕标签</h2><p>如果在这个标签里设置了内容，那么，打开网页时，内容会像弹幕一样自动移动。<br><strong>属性：</strong></p>
<ul>
<li><p><code>direction=&quot;right&quot;</code>：移动的目标方向。属性值可以是：<code>left</code>（从右向左移动，默认值）、<code>right</code>（从左向右移动）、<code>up</code>（从下向上移动）、<code>down</code>（从上向下移动）。</p>
</li>
<li><p><code>behavior=&quot;slide&quot;</code>：行为方式。属性值可以是：<code>slide</code>（只移动一次）、<code>scroll</code>（循环移动，默认值）、<code>alternate</code>（循环移动）、。<br><code>alternate</code>和<code>scroll</code>属性值都是循环移动，区别在于：假设在<code>direction=&quot;right&quot;</code>的情况下，<code>behavior=&quot;scroll&quot;</code>表示从左到右、从左到右、从左到右···<code>behavior=&quot;alternate&quot;</code>表示从左到右、从右到左、从左到右···</p>
</li>
<li><p><code>scrollamount=&quot;30&quot;</code>：移动的速度</p>
</li>
<li><p><code>loop=&quot;3&quot;</code>: 循环多少圈。负值表示无限循环</p>
</li>
<li><p><code>scrolldelay=&quot;1000&quot;</code>：移动一次休息多长时间。单位是毫秒。</p>
</li>
</ul>
<p>举例：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">marquee</span> <span class="attr">behavior</span>=<span class="string">"alternate"</span> <span class="attr">direction</span>=<span class="string">"down"</span>  <span class="attr">width</span>=<span class="string">"300"</span> <span class="attr">height</span>=<span class="string">"200"</span> <span class="attr">bgcolor</span>=<span class="string">"#8c5dc1"</span>&gt;</span>我来了<span class="tag">&lt;/<span class="name">marquee</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>效果：</p>
<p><img src="http://img.smyhvae.com/2015-10-02-cnblogs_html_04.gif" alt=""></p>
<h2 id="html废弃标签介绍"><a href="#html废弃标签介绍" class="headerlink" title="html废弃标签介绍"></a>html废弃标签介绍</h2><p>HTML现在只负责语义，而不负责样式。但是HTML一开始，连样式也包办了。这些样式的标签，都已经被废弃。</p>
<p>2004年之前的东西：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">font</span> <span class="attr">size</span>=<span class="string">"9"</span> <span class="attr">color</span>=<span class="string">"red"</span>&gt;</span>哈哈<span class="tag">&lt;/<span class="name">font</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>下面这些标签都是css钩子，而不是原意：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">b</span>&gt;</span>加粗<span class="tag">&lt;/<span class="name">b</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">u</span>&gt;</span>下划线<span class="tag">&lt;/<span class="name">u</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">i</span>&gt;</span>倾斜<span class="tag">&lt;/<span class="name">i</span>&gt;</span></span><br><span class="line">   <span class="tag">&lt;<span class="name">del</span>&gt;</span>删除线<span class="tag">&lt;/<span class="name">del</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">em</span>&gt;</span>强调<span class="tag">&lt;/<span class="name">em</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">strong</span>&gt;</span>强调<span class="tag">&lt;/<span class="name">strong</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>这些标签，是有着浓厚的样式的作用，干涉了css的作用，所以HTML抛弃了他们。</p>
<p>类似的还有水平线标签：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">hr</span> /&gt;</span></span><br></pre></td></tr></table></figure>

<p>换行标签：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">&lt;br &#x2F;&gt;</span><br></pre></td></tr></table></figure>

<p>但是，网页中99.9999%需要换行的时候，是因为另起了一个段落，所以要用p，而不要用<code>&lt;br /&gt;</code>。不到万不得已，不要用br标签。</p>
<p>标准的div+css页面，只会用到种类很少的标签：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">div  p  h1  span   a   img   ul   ol    dl    input</span><br></pre></td></tr></table></figure>

<p>知道每个标签的特殊用法、属性。比如a标签，img的属性。</p>
<blockquote>
<p><span class="exturl" data-url="aHR0cHM6Ly9naXRodWIuY29tL3FpYW5ndXlpaGFvL1dlYg==" title="https://github.com/qianguyihao/Web">转载连接<i class="fa fa-external-link"></i></span></p>
</blockquote>

    </div>

    
    
    

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/html%E6%95%99%E7%A8%8B/" rel="tag"># html教程</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/2016/10/20/Git%E7%9A%84%E4%BD%BF%E7%94%A8/" rel="prev" title="Git的使用">
      <i class="fa fa-chevron-left"></i> Git的使用
    </a></div>
      <div class="post-nav-item">
    <a href="/2016/12/25/html%E6%A0%87%E7%AD%BE%E4%B8%8A/" rel="next" title="html标签上">
      html标签上 <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  

  </div>


          </div>
          
    <div class="comments" id="valine-comments"></div>

<script>
  window.addEventListener('tabs:register', () => {
    let activeClass = CONFIG.comments.activeClass;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#本文主要内容"><span class="nav-number">1.</span> <span class="nav-text">本文主要内容</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#列表标签"><span class="nav-number">2.</span> <span class="nav-text">列表标签</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#1、无序列表-lt-ul-gt-，无序列表中的每一项是-lt-li-gt"><span class="nav-number">2.1.</span> <span class="nav-text">1、无序列表&lt;ul&gt;，无序列表中的每一项是&lt;li&gt;</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#ul标签实际应用场景："><span class="nav-number">2.1.1.</span> <span class="nav-text">ul标签实际应用场景：</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2、有序列表-lt-OL-gt-，里面的每一项是-lt-li-gt"><span class="nav-number">2.2.</span> <span class="nav-text">2、有序列表&lt;OL&gt;，里面的每一项是&lt;li&gt;</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3、定义列表-lt-dl-gt"><span class="nav-number">2.3.</span> <span class="nav-text">3、定义列表&lt;dl&gt;</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#表格标签"><span class="nav-number">3.</span> <span class="nav-text">表格标签</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#lt-tr-gt-：行"><span class="nav-number">3.1.</span> <span class="nav-text">&lt;tr&gt;：行</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#lt-td-gt-：单元格"><span class="nav-number">3.2.</span> <span class="nav-text">&lt;td&gt;：单元格</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#单元格的合并"><span class="nav-number">3.3.</span> <span class="nav-text">单元格的合并</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#lt-th-gt-：加粗的单元格。相当于-lt-td-gt-lt-b-gt"><span class="nav-number">3.4.</span> <span class="nav-text">&lt;th&gt;：加粗的单元格。相当于&lt;td&gt; + &lt;b&gt;</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#表格的-lt-thead-gt-标签、-lt-tbody-gt-标签、-lt-tfoot-gt-标签"><span class="nav-number">3.5.</span> <span class="nav-text">表格的&lt;thead&gt;标签、&lt;tbody&gt;标签、&lt;tfoot&gt;标签</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#框架标签"><span class="nav-number">4.</span> <span class="nav-text">框架标签</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#lt-frameset-gt-：框架的集合"><span class="nav-number">4.1.</span> <span class="nav-text">&lt;frameset&gt;：框架的集合</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#lt-frame-gt-：框架"><span class="nav-number">4.2.</span> <span class="nav-text">&lt;frame&gt;：框架</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#内嵌框架"><span class="nav-number">5.</span> <span class="nav-text">内嵌框架</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#表单标签"><span class="nav-number">6.</span> <span class="nav-text">表单标签</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#lt-input-gt-：输入标签（文本框）"><span class="nav-number">6.1.</span> <span class="nav-text">&lt;input&gt;：输入标签（文本框）</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#lt-select-gt-：下拉列表标签"><span class="nav-number">6.2.</span> <span class="nav-text">&lt;select&gt;：下拉列表标签</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#lt-textare-gt-标签：多行文本输入框"><span class="nav-number">6.3.</span> <span class="nav-text">&lt;textare&gt;标签：多行文本输入框</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#表单的语义化"><span class="nav-number">6.4.</span> <span class="nav-text">表单的语义化</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#lt-label-gt-标签"><span class="nav-number">6.5.</span> <span class="nav-text">&lt;label&gt;标签</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#多媒体标签"><span class="nav-number">7.</span> <span class="nav-text">多媒体标签</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#lt-bgsound-gt-标签：播放背景音乐"><span class="nav-number">7.1.</span> <span class="nav-text">&lt;bgsound&gt;标签：播放背景音乐</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#lt-embed-gt-标签：播放多媒体文件（音频、视频等）"><span class="nav-number">7.2.</span> <span class="nav-text">&lt;embed&gt;标签：播放多媒体文件（音频、视频等）</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#lt-object-gt-标签：播放多媒体文件（音频、视频等）"><span class="nav-number">7.3.</span> <span class="nav-text">&lt;object&gt;标签：播放多媒体文件（音频、视频等）</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#lt-marquee-gt-：滚动字幕标签"><span class="nav-number">8.</span> <span class="nav-text">&lt;marquee&gt;：滚动字幕标签</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#html废弃标签介绍"><span class="nav-number">9.</span> <span class="nav-text">html废弃标签介绍</span></a></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="王志超"
      src="/images/logo.png">
  <p class="site-author-name" itemprop="name">王志超</p>
  <div class="site-description" itemprop="description">记录前端的点点滴滴</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives">
          <span class="site-state-item-count">19</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
        <span class="site-state-item-count">3</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
        <span class="site-state-item-count">7</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author motion-element">
      <span class="links-of-author-item">
        <span class="exturl" data-url="aHR0cHM6Ly9naXRodWIuY29tL3d6YzU3MDczODIwNQ==" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;wzc570738205"><i class="fa fa-fw fa-github"></i>GitHub</span>
      </span>
      <span class="links-of-author-item">
        <span class="exturl" data-url="aHR0cHM6Ly93d3cuY25ibG9ncy5jb20vd2FuZ3poaWNoYW8v" title="博客园 → https:&#x2F;&#x2F;www.cnblogs.com&#x2F;wangzhichao&#x2F;"><i class="fa fa-fw fa-globe"></i>博客园</span>
      </span>
      <span class="links-of-author-item">
        <span class="exturl" data-url="aHR0cDovL21haWwucXEuY29tL2NnaS1iaW4vcW1fc2hhcmU/dD1xbV9tYWlsbWUmZW1haWw9eHJHOHBmLXo5dkgzLTRhM3RfaWxxYXM=" title="E-Mail → http:&#x2F;&#x2F;mail.qq.com&#x2F;cgi-bin&#x2F;qm_share?t&#x3D;qm_mailme&amp;email&#x3D;xrG8pf-z9vH3-4a3t_ilqas"><i class="fa fa-fw fa-envelope"></i>E-Mail</span>
      </span>
      <span class="links-of-author-item">
        <a href="//shang.qq.com/wpa/qunwpa?idkey=f528775f242a7c39fe8512383febb8990e621bf97354c2fb82f6832097b7c501" target="_blank" rel="noopener" title="QQ群 → &#x2F;&#x2F;shang.qq.com&#x2F;wpa&#x2F;qunwpa?idkey&#x3D;f528775f242a7c39fe8512383febb8990e621bf97354c2fb82f6832097b7c501"><i class="fa fa-fw fa-qq"></i>QQ群</a>
      </span>
      <span class="links-of-author-item">
        <span class="exturl" data-url="aHR0cDovL3dhbmd6Yy53YW5nL3dlYnNvY2tldC8=" title="websocket → http:&#x2F;&#x2F;wangzc.wang&#x2F;websocket&#x2F;"><i class="fa fa-fw fa-comments"></i>websocket</span>
      </span>
  </div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

<div class="copyright">
  
  &copy; 2015 – 
  <span itemprop="copyrightYear">2020</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">王志超</span>
</div>

        








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/pisces.js"></script>


<script src="/js/next-boot.js"></script>

<script src="/js/bookmark.js"></script>




  




  
<script src="/js/local-search.js"></script>









<script>
if (document.querySelectorAll('div.pdf').length) {
  NexT.utils.getScript('//cdn.jsdelivr.net/npm/pdfobject@2/pdfobject.min.js', () => {
    document.querySelectorAll('div.pdf').forEach(element => {
      PDFObject.embed(element.getAttribute('target'), element, {
        pdfOpenParams: {
          navpanes: 0,
          toolbar: 0,
          statusbar: 0,
          pagemode: 'thumbs',
          view: 'FitH'
        },
        PDFJS_URL: '/lib/pdf/web/viewer.html',
        height: element.getAttribute('height') || '700px'
      });
    });
  }, window.PDFObject);
}
</script>




  

  


<script>
NexT.utils.loadComments(document.querySelector('#valine-comments'), () => {
  NexT.utils.getScript('//unpkg.com/valine/dist/Valine.min.js', () => {
    var GUEST = ['nick', 'mail', 'link'];
    var guest = 'nick,mail,link';
    guest = guest.split(',').filter(item => {
      return GUEST.includes(item);
    });
    new Valine({
      el: '#valine-comments',
      verify: false,
      notify: false,
      appId: '9fgm6JVbw8PrOlvp7LfsKjsh-gzGzoHsz',
      appKey: 'LReLvzSwPnBOAz5LiIgJsiDO',
      placeholder: "说点什么吧",
      avatar: 'mm',
      meta: guest,
      pageSize: '10' || 10,
      visitor: false,
      lang: 'zh-cn' || 'zh-cn',
      path: location.pathname,
      recordIP: false,
      serverURLs: ''
    });
  }, window.Valine);
});
</script>

</body>
</html>
